<%@ Page Language="vb" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<script  runat="server">
Sub Page_Load(sender As Object, e As EventArgs)	
      If Not Page.IsPostBack Then
	Dim myConn As SqlConnection
	Dim myCom As SqlCommand
	Dim myDrd as SqlDataReader
	Dim strSQL="select * from tblUsers "
	strSQL+= "order by UserName ASC"
	myConn  = New SqlConnection( _
	ConfigurationSettings.appSettings("conn"))
	myConn.Open	
	myCom=New SqlCommand(strSQL,myConn)
	myDrd=myCom.ExecuteReader()
	lstUsers.DataSource=myDrd
	lstUsers.DataBind()	
	myConn.Close()
      End If
End Sub
</script>	
<html>
</body>
<form runat="server">
User List:
<asp:DropDownList id="lstUsers" 
DataTextField="UserName" 
DataValueField="UserID"
 runat="server"/>
<br/><br/>
</form>
</body>
</html>